<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ROSS: core/tw-state.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <a href="https://github.com/ROSS-org/ROSS">
   <div id="projectname">ROSS
   </div>
   </a>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af18cf245e3394ab3b436135935cfd6e.html">core</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tw-state.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="ross_8h_source.html">ross.h</a>&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="lz4_8h_source.html">lz4.h</a>&quot;</code><br/>
</div>
<p><a href="tw-state_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af858e4fa1df4ce272f74ad0335f9a427"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tw-state_8c.html#af858e4fa1df4ce272f74ad0335f9a427">tw_snapshot</a> (<a class="el" href="structtw__lp.html">tw_lp</a> *lp, size_t state_sz)</td></tr>
<tr class="separator:af858e4fa1df4ce272f74ad0335f9a427"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23a06d48ada7a6f453ea34d6175516fd"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tw-state_8c.html#a23a06d48ada7a6f453ea34d6175516fd">tw_snapshot_delta</a> (<a class="el" href="structtw__lp.html">tw_lp</a> *lp, size_t state_sz)</td></tr>
<tr class="separator:a23a06d48ada7a6f453ea34d6175516fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd673114465dd29b555cc518faaa66bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tw-state_8c.html#acd673114465dd29b555cc518faaa66bc">tw_snapshot_restore</a> (<a class="el" href="structtw__lp.html">tw_lp</a> *lp, size_t state_sz)</td></tr>
<tr class="separator:acd673114465dd29b555cc518faaa66bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="af858e4fa1df4ce272f74ad0335f9a427"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tw_snapshot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtw__lp.html">tw_lp</a> *&#160;</td>
          <td class="paramname"><em>lp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>state_sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Make a snapshot of the LP state and store it into the delta buffer </p>

<p>Definition at line <a class="el" href="tw-state_8c_source.html#l00009">9</a> of file <a class="el" href="tw-state_8c_source.html">tw-state.c</a>.</p>

<p>References <a class="el" href="ross-types_8h_source.html#l00315">tw_lp::cur_state</a>, <a class="el" href="ross-types_8h_source.html#l00388">tw_pe::delta_buffer</a>, and <a class="el" href="ross-types_8h_source.html#l00308">tw_lp::pe</a>.</p>

</div>
</div>
<a class="anchor" id="a23a06d48ada7a6f453ea34d6175516fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long tw_snapshot_delta </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtw__lp.html">tw_lp</a> *&#160;</td>
          <td class="paramname"><em>lp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>state_sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create the delta from the current state and the snapshot. Compress it. </p>
<dl class="section return"><dt>Returns</dt><dd>The size of the compressed data placed in delta_buffer[1]. </dd></dl>

<p>Definition at line <a class="el" href="tw-state_8c_source.html#l00021">21</a> of file <a class="el" href="tw-state_8c_source.html">tw-state.c</a>.</p>

<p>References <a class="el" href="buddy_8c_source.html#l00234">buddy_alloc()</a>, <a class="el" href="ross-types_8h_source.html#l00385">tw_pe::cur_event</a>, <a class="el" href="ross-types_8h_source.html#l00315">tw_lp::cur_state</a>, <a class="el" href="ross-types_8h_source.html#l00275">tw_event::delta_buddy</a>, <a class="el" href="ross-types_8h_source.html#l00388">tw_pe::delta_buffer</a>, <a class="el" href="ross-types_8h_source.html#l00276">tw_event::delta_size</a>, <a class="el" href="ross-global_8c_source.html#l00034">g_tw_delta_sz</a>, <a class="el" href="ross-global_8c_source.html#l00041">g_tw_lz4_knob</a>, <a class="el" href="ross-global_8c_source.html#l00075">g_tw_pe</a>, <a class="el" href="lz4_8c_source.html#l00657">LZ4_compress_fast_extState()</a>, <a class="el" href="ross-types_8h_source.html#l00308">tw_lp::pe</a>, <a class="el" href="ross-types_8h_source.html#l00149">tw_statistics::s_buddy</a>, <a class="el" href="ross-types_8h_source.html#l00150">tw_statistics::s_lz4</a>, <a class="el" href="ross-types_8h_source.html#l00415">tw_pe::stats</a>, <a class="el" href="aarch64_8h_source.html#l00006">tw_clock_read()</a>, <a class="el" href="tw-util_8c_source.html#l00074">tw_error()</a>, and <a class="el" href="ross-extern_8h_source.html#l00164">TW_LOC</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="tw-state_8c_a23a06d48ada7a6f453ea34d6175516fd_cgraph.png" border="0" usemap="#tw-state_8c_a23a06d48ada7a6f453ea34d6175516fd_cgraph" alt=""/></div>
<map name="tw-state_8c_a23a06d48ada7a6f453ea34d6175516fd_cgraph" id="tw-state_8c_a23a06d48ada7a6f453ea34d6175516fd_cgraph">
<area shape="rect" id="node2" href="buddy_8c.html#aa9dd0e2ab55c7090670a556e026f515c" title="buddy_alloc" alt="" coords="236,139,327,165"/><area shape="rect" id="node5" href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa" title="tw_error" alt="" coords="471,183,540,209"/><area shape="rect" id="node7" href="lz4_8c.html#a19a6258c0092d5b3255a41d7566248d7" title="LZ4_compress_fast_extState" alt="" coords="185,277,378,304"/><area shape="rect" id="node30" href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757" title="tw_clock_read" alt="" coords="228,328,335,355"/><area shape="rect" id="node3" href="buddy_8c.html#a3caec5f80ecae355c6674d9aef1ccfef" title="buddy_split" alt="" coords="461,132,549,159"/><area shape="rect" id="node4" href="buddy_8c.html#a8359775791de03af6f115e84249141b1" title="next_power2" alt="" coords="457,81,553,108"/><area shape="rect" id="node6" href="network-mpi_8c.html#a2e139e8547a091c4c4ea0b445fe8dd1c" title="tw_net_abort" alt="" coords="642,5,739,32"/><area shape="rect" id="node8" href="lz4_8c.html#ab7bfc24aa9fe12cae4f0da4538c08aef" title="LZ4_64bits" alt="" coords="1246,411,1333,437"/><area shape="rect" id="node9" href="lz4_8c.html#a9be2dc3e3605017199507c4fdb8b7a8f" title="LZ4_compress_generic" alt="" coords="427,284,584,311"/><area shape="rect" id="node28" href="lz4_8c.html#a2b09f5ca41ce609bb136d3637beffe04" title="LZ4_compressBound" alt="" coords="433,563,578,589"/><area shape="rect" id="node29" href="lz4_8c.html#a62d9f1ebf60fd83bf2f0d1a58e80a64c" title="LZ4_resetStream" alt="" coords="444,233,567,260"/><area shape="rect" id="node10" href="lz4_8c.html#ab8919e7197ca3e2e3b1789b3a66c0703" title="LZ4_count" alt="" coords="839,259,921,285"/><area shape="rect" id="node14" href="lz4_8c.html#a91090d7f3d29948be259526ace41da4c" title="LZ4_read32" alt="" coords="1244,259,1335,285"/><area shape="rect" id="node17" href="lz4_8c.html#a2d5adc05c787b62c89b588f4a983f302" title="LZ4_getPosition" alt="" coords="633,411,749,437"/><area shape="rect" id="node18" href="lz4_8c.html#a92278f0658735749f30ae82e895f1a78" title="LZ4_getPositionOnHash" alt="" coords="798,436,962,463"/><area shape="rect" id="node19" href="lz4_8c.html#a3021d918ac3b36d85a61bedab5387e45" title="LZ4_hashPosition" alt="" coords="817,360,943,387"/><area shape="rect" id="node23" href="lz4_8c.html#a1dbbcf20551bf41ef0b8b8c0864a92d9" title="LZ4_putPosition" alt="" coords="633,309,749,336"/><area shape="rect" id="node24" href="lz4_8c.html#af0798145fd1c1178d96b18963f42f861" title="LZ4_putPositionOnHash" alt="" coords="798,309,962,336"/><area shape="rect" id="node25" href="lz4_8c.html#a0c2e465f97a0020fd9d49af49689644b" title="LZ4_wildCopy" alt="" coords="638,107,743,133"/><area shape="rect" id="node27" href="lz4_8c.html#a3a6a0833a6f5ee0e99c80cbae73ca3a7" title="LZ4_writeLE16" alt="" coords="1033,81,1143,108"/><area shape="rect" id="node11" href="lz4_8c.html#ac0c3137c89a9186b6422b4dd1842a05d" title="LZ4_NbCommonBytes" alt="" coords="1011,208,1165,235"/><area shape="rect" id="node13" href="lz4_8c.html#adceb4c7713e1bed1554da37458db6fb6" title="LZ4_read16" alt="" coords="1043,309,1133,336"/><area shape="rect" id="node15" href="lz4_8c.html#aae7aec5429d810d72971501f66d6d79c" title="LZ4_read_ARCH" alt="" coords="1027,360,1149,387"/><area shape="rect" id="node12" href="lz4_8c.html#aa8a9ba402bf00e8e6c21691085ae9601" title="LZ4_isLittleEndian" alt="" coords="1225,145,1354,172"/><area shape="rect" id="node16" href="lz4_8c.html#a08d108393438a63016c65c4433a95109" title="LZ4_read64" alt="" coords="1244,360,1335,387"/><area shape="rect" id="node20" href="lz4_8c.html#a136925d371704bc6a49d5eb3f85b9ff6" title="LZ4_hashSequenceT" alt="" coords="1015,563,1161,589"/><area shape="rect" id="node21" href="lz4_8c.html#a6410a58309ab003d2d64a1323aead192" title="LZ4_hashSequence" alt="" coords="1221,537,1358,564"/><area shape="rect" id="node22" href="lz4_8c.html#aa868f14073d9b94702f06b6d4a3b1780" title="LZ4_hashSequence64" alt="" coords="1214,588,1365,615"/><area shape="rect" id="node26" href="lz4_8c.html#ad53d5222d76f18ead9f7db9863091d18" title="LZ4_copy8" alt="" coords="837,107,923,133"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="acd673114465dd29b555cc518faaa66bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tw_snapshot_restore </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtw__lp.html">tw_lp</a> *&#160;</td>
          <td class="paramname"><em>lp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>state_sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Restore the state of lp to the (decompressed) data held in buffer </p>

<p>Definition at line <a class="el" href="tw-state_8c_source.html#l00055">55</a> of file <a class="el" href="tw-state_8c_source.html">tw-state.c</a>.</p>

<p>References <a class="el" href="ross-types_8h_source.html#l00385">tw_pe::cur_event</a>, <a class="el" href="ross-types_8h_source.html#l00315">tw_lp::cur_state</a>, <a class="el" href="ross-types_8h_source.html#l00275">tw_event::delta_buddy</a>, <a class="el" href="ross-types_8h_source.html#l00388">tw_pe::delta_buffer</a>, <a class="el" href="ross-global_8c_source.html#l00075">g_tw_pe</a>, <a class="el" href="lz4_8c_source.html#l01298">LZ4_decompress_fast()</a>, <a class="el" href="ross-types_8h_source.html#l00308">tw_lp::pe</a>, <a class="el" href="ross-types_8h_source.html#l00150">tw_statistics::s_lz4</a>, <a class="el" href="ross-types_8h_source.html#l00415">tw_pe::stats</a>, <a class="el" href="aarch64_8h_source.html#l00006">tw_clock_read()</a>, <a class="el" href="tw-util_8c_source.html#l00074">tw_error()</a>, and <a class="el" href="ross-extern_8h_source.html#l00164">TW_LOC</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="tw-state_8c_acd673114465dd29b555cc518faaa66bc_cgraph.png" border="0" usemap="#tw-state_8c_acd673114465dd29b555cc518faaa66bc_cgraph" alt=""/></div>
<map name="tw-state_8c_acd673114465dd29b555cc518faaa66bc_cgraph" id="tw-state_8c_acd673114465dd29b555cc518faaa66bc_cgraph">
<area shape="rect" id="node2" href="lz4_8c.html#a1b6fd5873bbe60abc9a6bf7b3e75056a" title="LZ4_decompress_fast" alt="" coords="198,81,349,108"/><area shape="rect" id="node10" href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757" title="tw_clock_read" alt="" coords="220,132,327,159"/><area shape="rect" id="node11" href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa" title="tw_error" alt="" coords="239,183,308,209"/><area shape="rect" id="node3" href="lz4_8c.html#a711e2044000420a1e68d84aeb0d47f58" title="LZ4_decompress_generic" alt="" coords="397,81,568,108"/><area shape="rect" id="node4" href="lz4_8c.html#aeeb2fc48e401f524afcfdaa6e97824ba" title="LZ4_copy4" alt="" coords="626,5,713,32"/><area shape="rect" id="node5" href="lz4_8c.html#ad53d5222d76f18ead9f7db9863091d18" title="LZ4_copy8" alt="" coords="793,81,879,108"/><area shape="rect" id="node6" href="lz4_8c.html#a69a8c81f7731ff4ae0d292541bbb2d69" title="LZ4_readLE16" alt="" coords="616,157,723,184"/><area shape="rect" id="node9" href="lz4_8c.html#a0c2e465f97a0020fd9d49af49689644b" title="LZ4_wildCopy" alt="" coords="617,107,722,133"/><area shape="rect" id="node7" href="lz4_8c.html#aa8a9ba402bf00e8e6c21691085ae9601" title="LZ4_isLittleEndian" alt="" coords="771,144,901,171"/><area shape="rect" id="node8" href="lz4_8c.html#adceb4c7713e1bed1554da37458db6fb6" title="LZ4_read16" alt="" coords="791,195,881,221"/><area shape="rect" id="node12" href="network-mpi_8c.html#a2e139e8547a091c4c4ea0b445fe8dd1c" title="tw_net_abort" alt="" coords="434,183,531,209"/></map>
</div>
</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
